﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>CKEditor</title>
    <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
    <script type="text/javascript" src="./ckeditor.js"></script>
    <!--
    <script type="text/javascript" src="./ckfinder.js"></script>
    -->
    <link href="contents.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<FORM method=post>
    <TEXTAREA name="editor1" id="editor1" cols="80"  rows="10"></TEXTAREA>
    <SCRIPT type=text/javascript>
    /*
    
            filebrowserUploadUrl : '../../../APP_Page/common/upload.aspx?action_=create',
            filebrowserImageUploadUrl : '../../../APP_Page/common/upload.aspx?action_=create&type=Images',
    */
        var editor = CKEDITOR.replace( 'editor1' , {                           
             filebrowserBrowseUrl: '../../../APP_Page/ckfinder/ckfinder.html',
             filebrowserImageBrowseUrl: '../../../APP_Page/ckfinder/ckfinder.html?Type=Images',
             filebrowserFlashBrowseUrl: '../../../APP_Page/ckfinder/ckfinder.html?Type=Flash',
             filebrowserUploadUrl: '../../../APP_Page/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
             filebrowserImageUploadUrl: '../../../APP_Page/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
             filebrowserFlashUploadUrl: '../../../APP_Page/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash',
            height : "450",
            skin : 'v2' 
        }); 
        
        function getContent() {
            //return document.getElementById('editor1').value  ;
            return editor.getData() ;
        }
        
        //document.getElementById('editor1').value = parent.htmlText_ ;
        editor.setData(parent.htmlText_) ;
        //CKFinder.SetupCKEditor(editor, '../ckfinderPath/');

/*
function setURL(code, fileUrl, fileName, message) 
{

    if (code!="0") {
        alert(message); 
        return ;
    }
    
   //获取主Div下的所有文本框控件
    var inputStr = document.getElementsByTagName("Input");
    for(var i=0; i<inputStr.length; i++)
    {
        if(inputStr[i].type=="text")
        {
            //第一个输入框控件是图像路径，得到ID，设置新的图片路径
            CKEDITOR.document.getById(inputStr[i].id).setValue(fileUrl);
            break ;
        }
    }
    CKEDITOR.document.getById('previewImage').setAttribute('src', decodeURI(fileUrl));
}
*/
    </SCRIPT>
</FORM>
</body>
</html>
